home *** CD-ROM | disk | FTP | other *** search
- LENGTH(3I) Last changed: 1-6-98
-
-
- NNAAMMEE
- LLEENNGGTTHH - Returns the number of words transferred
-
- SSYYNNOOPPSSIISS
- LLEENNGGTTHH (([II==]_i))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- SSTTAANNDDAARRDDSS
- CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
-
- DDEESSCCRRIIPPTTIIOONN
- LLEENNGGTTHH returns the length (in words) of a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT
- statement transfer. It accepts the following argument:
-
- _i Must be a nonnegative integer or Boolean value. Represents a
- unit number.
-
- If _i is an integer, _i must be of KKIINNDD==88 on UNICOS and UNICOS/mk
- systems, or of KKIINNDD==44 on IRIX systems.
-
- LLEENNGGTTHH is an elemental function. The name of this intrinsic cannot be
- passed as an argument.
-
- NNOOTTEESS
- On UNICOS and UNICOS/mk systems, LLEENNGGTTHH can be called as either an
- external subprogram or as an intrinsic procedure.
-
- RREETTUURRNN VVAALLUUEESS
- The value returned is of type default integer.
-
- If the LLEENNGGTTHH function is called during the execution of asynchronous
- I/O with BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT, the execution sequence is delayed
- until the transfer is complete. LLEENNGGTTHH then returns the number of
- words successfully transferred. On UNICOS and UNICOS/mk systems, the
- length is specified in Cray words. On IRIX systems, the length is
- specified in the default word size.
-
- Programs that transfer characters or data from a medium that supports
- partial-word I/O cannot detect partial-word transfers. The return
- value is rounded up to a word count in these cases.
-
- The return value is 0 under the following two conditions:
-
- * An end-of-file or error occurs
-
- * It is following a read or write of a zero-length record.
-
- UUNNIITT(3I) should be used prior to LLEENNGGTTHH to properly distinguish these
- previous two cases.
-
- EEXXAAMMPPLLEESS
- PROGRAM PGM
- DIMENSION V(16384)
- 10 BUFFER IN (32,-1) (V(1),V(16384))
- X= UNIT(32)
- K= LENGTH(32)
- IF (X .GE. 0.0) GOTO 14
- 11 DO 12 I=1,K,1
- 12 IF (V(I) .EQ. 'KEY') GOTO 13
- IF (X .EQ. -1.0) GOTO 10
- STOP
- 13 ...
- ...
- 14 CONTINUE
- END
-
- SSEEEE AALLSSOO
- UUNNIITT(3I)
-
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
- printed version of this man page.
-
-